namespace Cos.Core.NHibernate
{
    #region Usings

    using System;
    using System.Collections.Generic;

    #endregion

    public class ArchivePageDataModel
    {
        #region Constructors and Destructors

        public ArchivePageDataModel() {}

        #endregion

        #region Properties

        public virtual DateTime ArchiveDate { get; set; }

        //public virtual IEnumerable<ArchiveElementDataModel> ArchiveElements { get; set; }

        public virtual long Id { get; set; }

        public virtual string Author { get; set; }

        public virtual string CultureCode { get; set; }

        public virtual int NavId { get; set; }

        public virtual string PageName { get; set; }

        public virtual bool IsPageNavEnd { get; set; }

        public virtual bool IsPageVisible { get; set; }

        public virtual bool IsPageVisibilityPreview { get; set; }

        #endregion

        #region Object Overrides

        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return false;
            }

            var model = obj as ArchivePageDataModel;

            return model != null && this.Id == model.Id;
        }

        public override int GetHashCode()
        {
            return this.Id.GetHashCode();
        }

        #endregion
    }
}